package com.des1gn.ymgetil.thread;

import cn.hutool.core.util.RandomUtil;
import com.des1gn.ymgetil.service.ProxyService;
import com.des1gn.ymgetil.service.TaskService;
import com.des1gn.ymgetil.service.UserInfoService;
import com.des1gn.ymgetil.service.impl.ProxyServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName KeepAliaveThread
 * @Description TODO
 * @Author Des1gn
 * @Date 2021/11/25 9:32
 * @Version 1.0
 **/
@Component
@Slf4j
public class KeepAliaveThread implements InitializingBean {

    @Autowired
    TaskService taskService;
    @Override
    public void afterPropertiesSet(){
       /* log.info("定时刷新任务状态线程-----------------------");
        new Thread(()->{
            while (true){
                try {
                    log.info("定时刷新任务状态+++++++++++++++++");
                    int sleepNum = RandomUtil.randomInt(10,20)*1000;
                    Thread.sleep(sleepNum);
                    taskService.syncOrderStatus();
                } catch (Exception e) {
                    e.printStackTrace();
                }


            }
        }).start();*/
    }

}
